import Vue from 'vue'
import VueRouter from 'vue-router'
import BasicView from '../views/BasicView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect : "/basic",
    },
    {
      path: '/basic',
      name: 'basic',
      component: BasicView
    },
    {
        path: '/echarts',
        name: 'echarts',
        component: () => import("@/views/EcharsView"),
        meta: {keepAlive: true} //true缓存 false不缓存
    },
    {
        path: '/aiFace',
        name: 'aiFace',
        component: () => import("@/views/AIFaceView"),
    }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
